﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Jumpton.Persistent;
using System.Data;

namespace Jumpton.SFA.Server.Entity
{
    [RelationMap("Templete", typeof(Templete), "a")]
    [Relation(RelationJoinType.Left, typeof(DictionaryItems), "b", "a", "DictionaryItemID", "Type")]
    public class TempleteView : ObjectRow
    {
        public TempleteView() { }
        public TempleteView(DataRow row, ObjectTable parent) : base(row, parent) { }


        [Key("ID", TableAlias = "a")]
        public int ID { get { return (int)GetValue("ID"); } }

        [Field("Content", TableAlias = "a")]
        public string Content { get { return (string)GetValue("Content"); } }

        [Field("Name", TableAlias = "b")]
        public string TypeName
        {
            get
            {
                return (string)GetValue("TypeName");
            }
           
        }


        [Field("Type", TableAlias = "a")]
        public decimal Type
        {
            get
            {
                return (System.Decimal)GetValue("Type");
            }

        }

        [Field("IsActive", TableAlias = "a")]
        public bool IsActive
        {
            get
            {
                return (System.Boolean)GetValue("IsActive");
            }
          
        }

        [Field("UpdateBy", TableAlias = "a")]
        public string UpdateBy
        {
            get
            {
                return (System.String)GetValue("UpdateBy");
            }
          
        }

        [Field("LastUpdate", TableAlias = "a")]
        public System.DateTime LastUpdate
        {
            get
            {
                return (System.DateTime)GetValue("LastUpdate");
            }
            
        }


    }
}
